﻿using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;

namespace FunasrSTT.Translate.Converters
{
    public class LogLevelToBrushConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value switch
            {
                Models.Messages.LogLevel.Debug => Brushes.Blue,
                Models.Messages.LogLevel.Info => Brushes.Gray,
                Models.Messages.LogLevel.Error => Brushes.Red,
                _ => Brushes.Black
            };
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
          => throw new NotSupportedException();
    }

}
